home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 12 / BBS in a box XII-1.iso / Files / Art / Art Tools / RgnMaster 1.0.sit / RgnMaster ƒ / Source / Meat 'n Guts / Regions.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-03-29  |  1.6 KB  |  56 lines  |  [TEXT/KAHL]

  1. #ifndef _REGIONS_H_
  2. #define _REGIONS_H_
  3.  
  4. // InitRegionMaker.
  5. // Initialize the region-making package; the conversion from picts
  6. // to regions requires an offscreen grafport buffer, thus requiring
  7. // this call.
  8. OSErr InitRegionMaker(Rect *screenSize, ResType rgnType = 'Rgn ');
  9.  
  10.  
  11. // SetRegionType.
  12. // Sets the resource type of the converted regions, i.e.
  13. // from 'PICT' to 'Rgn ', 'RGN ', 'RgnS', etc.
  14. void SetRegionType(ResType rgnType);
  15.  
  16.  
  17. // GetRegionType.
  18. // Returns the current resource type of regions.
  19. ResType GetRegionType();
  20.  
  21.  
  22. // PictureFromScrap.
  23. // Get the picture from the scrap (clipboard), if any. If no
  24. // picture, returns nil.
  25. PicHandle PictureFromScrap();
  26.  
  27.  
  28. // DataFromScrap.
  29. // Returns the requested resource type from the scrap/clipboard. If no
  30. // resource of the specified type is present, returns nil.
  31. Handle DataFromScrap(ResType dataType);
  32.  
  33.  
  34. // RegionToScrap.
  35. // Given a handle to a valid region, this routine "pastes" the region
  36. // onto the scrap (clipboard). Returns an error code if anything goes
  37. // wrong. Calls _ZeroScrap() before putting the region onto the clipboard,
  38. // so anything there previously is erased.
  39. OSErr RegionToScrap(RgnHandle theRgn);
  40.  
  41.  
  42. // ConvertPictureToRegion
  43. // Here's the main man, the core guts, the head honcho, the
  44. // mustafa guy, the rastafarian, you get the idea. Calls _BitMapToRegion()
  45. // to do the actual dirty work.
  46. RgnHandle ConvertPictureToRegion(PicHandle thePicture, Boolean doOffset = true);
  47.  
  48.  
  49. // PreviewRgn.
  50. // Given a valid region, puts up its own window and shows what the
  51. // region looks like, waits for an event (mouse, key) and then
  52. // disposes of the window.
  53. void PreviewRgn(RgnHandle theRgn);
  54.  
  55.  
  56. #endif // _REGIONS_H_